<?php

// src/Acme/UserBundle/Entity/User.php

namespace STAGE\UserBundle\Entity;

use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="STAGE\UserBundle\Entity\UserRepository")
 * @ORM\Table(name="user")
 */
class User extends BaseUser {

    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    public function __construct() {
        parent::__construct();
        // your own logic
    }

    /**
     * @var string
     *
     * @ORM\Column(name="nom", type="string",length=255,nullable=true)
     */
    private $nom;

    /**
     * @var string
     *
     * @ORM\Column(name="prenom", type="string",length=255,nullable=true)
     */
    private $prenom;

    /**
     * @var string
     *
     * @ORM\Column(name="function", type="string",length=255,nullable=true)
     */
    private $function;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date_naissance", type="date",nullable=true)
     */
    private $dateNaissance;

    /**
     * @var integer
     *
     * @ORM\Column(name="cin", type="integer",nullable=true)
     */
    private $cin;

    /**
     * @var integer
     *
     * @ORM\Column(name="telephonne", type="integer",nullable=true)
     */
    private $telephonne;

    /**
     *
     * @ORM\ManyToOne(targetEntity="STAGE\StageBundle\Entity\Societe",inversedBy="encadreurs")
     */
    private $societe;

    /**
     *
     * @ORM\OneToMany(targetEntity="STAGE\StageBundle\Entity\StagePersonne",mappedBy="user")
     */
    private $stages;

    /**
     * 
     * @ORM\ManyToMany(targetEntity="STAGE\StageBundle\Entity\Stage",inversedBy="etudiants")
     */
    private $stageEtudiant;
    /**
     *
     * @ORM\ManyToOne(targetEntity="STAGE\StageBundle\Entity\Stage",inversedBy="encadreur")
     */
    private $stageEncadreur;

    
 
    /**
     *
     * @ORM\OneToMany(targetEntity="STAGE\StageBundle\Entity\Tache",mappedBy="users")
     */
    private $taches;
    
    /**
     *
     * @ORM\OneToMany(targetEntity="STAGE\StageBundle\Entity\Commentaire",mappedBy="user")
     */
    
    private $commentaires;

    /**
     *
     * @ORM\OneToMany(targetEntity="STAGE\StageBundle\Entity\Document",mappedBy="user")
     */
    private $documents;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set nom
     *
     * @param string $nom
     * @return User
     */
    public function setNom($nom) {
        $this->nom = $nom;

        return $this;
    }

    /**
     * Get nom
     *
     * @return string 
     */
    public function getNom() {
        return $this->nom;
    }

    /**
     * Set prenom
     *
     * @param string $prenom
     * @return User
     */
    public function setPrenom($prenom) {
        $this->prenom = $prenom;

        return $this;
    }

    /**
     * Get prenom
     *
     * @return string 
     */
    public function getPrenom() {
        return $this->prenom;
    }

    /**
     * Set dateNaissance
     *
     * @param \DateTime $dateNaissance
     * @return User
     */
    public function setDateNaissance($dateNaissance) {
        $this->dateNaissance = $dateNaissance;

        return $this;
    }

    /**
     * Get dateNaissance
     *
     * @return \DateTime 
     */
    public function getDateNaissance() {
        return $this->dateNaissance;
    }

    /**
     * Set cin
     *
     * @param integer $cin
     * @return User
     */
    public function setCin($cin) {
        $this->cin = $cin;

        return $this;
    }

    /**
     * Get cin
     *
     * @return integer 
     */
    public function getCin() {
        return $this->cin;
    }

    /**
     * Set telephonne
     *
     * @param integer $telephonne
     * @return User
     */
    public function setTelephonne($telephonne) {
        $this->telephonne = $telephonne;

        return $this;
    }

    /**
     * Get telephonne
     *
     * @return integer 
     */
    public function getTelephonne() {
        return $this->telephonne;
    }

    /**
     * Set societe
     *
     * @param \STAGE\StageBundle\Entity\Societe $societe
     * @return User
     */
    public function setSociete(\STAGE\StageBundle\Entity\Societe $societe = null) {
        $this->societe = $societe;

        return $this;
    }

    /**
     * Get societe
     *
     * @return \STAGE\StageBundle\Entity\Societe 
     */
    public function getSociete() {
        return $this->societe;
    }

    /**
     * Add stages
     *
     * @param \STAGE\StageBundle\Entity\StagePersonne $stages
     * @return User
     */
    public function addStage(\STAGE\StageBundle\Entity\StagePersonne $stages) {
        $this->stages[] = $stages;

        return $this;
    }

    /**
     * Remove stages
     *
     * @param \STAGE\StageBundle\Entity\StagePersonne $stages
     */
    public function removeStage(\STAGE\StageBundle\Entity\StagePersonne $stages) {
        $this->stages->removeElement($stages);
    }

    /**
     * Get stages
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getStages() {
        return $this->stages;
    }

    /**
     * Add commentaires
     *
     * @param \STAGE\StageBundle\Entity\Commentaire $commentaires
     * @return User
     */
    public function addCommentaire(\STAGE\StageBundle\Entity\Commentaire $commentaires) {
        $this->commentaires[] = $commentaires;

        return $this;
    }

    /**
     * Remove commentaires
     *
     * @param \STAGE\StageBundle\Entity\Commentaire $commentaires
     */
    public function removeCommentaire(\STAGE\StageBundle\Entity\Commentaire $commentaires) {
        $this->commentaires->removeElement($commentaires);
    }

    /**
     * Get commentaires
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCommentaires() {
        return $this->commentaires;
    }

    /**
     * Add documents
     *
     * @param \STAGE\StageBundle\Entity\Document $documents
     * @return User
     */
    public function addDocument(\STAGE\StageBundle\Entity\Document $documents) {
        $this->documents[] = $documents;

        return $this;
    }

    /**
     * Remove documents
     *
     * @param \STAGE\StageBundle\Entity\Document $documents
     */
    public function removeDocument(\STAGE\StageBundle\Entity\Document $documents) {
        $this->documents->removeElement($documents);
    }

    /**
     * Get documents
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getDocuments() {
        return $this->documents;
    }

    /**
     * Add taches
     *
     * @param \STAGE\StageBundle\Entity\Tache $taches
     * @return User
     */
    public function addTach(\STAGE\StageBundle\Entity\Tache $taches) {
        $this->taches[] = $taches;

        return $this;
    }

    /**
     * Remove taches
     *
     * @param \STAGE\StageBundle\Entity\Tache $taches
     */
    public function removeTach(\STAGE\StageBundle\Entity\Tache $taches) {
        $this->taches->removeElement($taches);
    }

    /**
     * Get taches
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getTaches() {
        return $this->taches;
    }

    /**
     * Set function
     *
     * @param string $function
     * @return User
     */
    public function setFunction($function) {
        $this->function = $function;

        return $this;
    }

    /**
     * Get function
     *
     * @return string 
     */
    public function getFunction() {
        return $this->function;
    }


    /**
     * Add stageEtudiant
     *
     * @param \STAGE\StageBundle\Entity\Stage $stageEtudiant
     * @return User
     */
    public function addStageEtudiant(\STAGE\StageBundle\Entity\Stage $stageEtudiant)
    {
        $this->stageEtudiant[] = $stageEtudiant;

        return $this;
    }

    /**
     * Remove stageEtudiant
     *
     * @param \STAGE\StageBundle\Entity\Stage $stageEtudiant
     */
    public function removeStageEtudiant(\STAGE\StageBundle\Entity\Stage $stageEtudiant)
    {
        $this->stageEtudiant->removeElement($stageEtudiant);
    }

    /**
     * Get stageEtudiant
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getStageEtudiant()
    {
        return $this->stageEtudiant;
    }

    /**
     * Set stageEncadreur
     *
     * @param \STAGE\StageBundle\Entity\Stage $stageEncadreur
     * @return User
     */
    public function setStageEncadreur(\STAGE\StageBundle\Entity\Stage $stageEncadreur = null)
    {
        $this->stageEncadreur = $stageEncadreur;

        return $this;
    }

    /**
     * Get stageEncadreur
     *
     * @return \STAGE\StageBundle\Entity\Stage 
     */
    public function getStageEncadreur()
    {
        return $this->stageEncadreur;
    }
}
